<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <script src="/static/mobile/js/jquery-1.8.2.js"></script>
    <script src="https://cdn.bootcss.com/mobile-detect/1.4.1/mobile-detect.js"></script>
    <style>
        img {width: 100%;max-width: 100%!important;}

    </style>
    <script>

//判断是操作系统
function getOs(){
    var systemOS=-1;//操作系统  -1为未知   0为IOS   1为安卓
    var model = "";
    try {
//判断数组中是否包含某字符串
        Array.prototype.contains = function(needle) {
            for (i in this) {
                if (this[i].indexOf(needle) > 0){
                    break;
                }

            }
            systemOS=-1;
        };
        var device_type = navigator.userAgent;
        //获取userAgent信息
        var md = new MobileDetect(device_type);
        //初始化mobile-detect
        var os = md.os();
        //获取系统
        if (os == "iOS") {
            //ios系统的处理
            os = md.os() + md.version("iPhone");
            model = md.mobile();
            systemOS=0;//ios
        }else if (os == "AndroidOS") {
            //Android系统的处理
            os = md.os() + md.version("Android");
            var sss = device_type+"";
            var i = sss.indexOf("Build/");
            var ii=sss.indexOf(";",i);
            if (i > -1) {
                var modelStr=sss.substring(sss.indexOf(";",0)+1,i)
                model = modelStr+sss.substring(i+6,ii);
            }
            systemOS=1;
            //安卓
        }

    } catch(error) {
        alert(error);
    } finally {
        return systemOS;
    }
}
    if(getOs()==0){
        $(function(){
//            var a = $("body").height();
//            var b = a*0.2;
//            var c = a+b;
//            $("body").css("height",c+"px");
        })
    }else if(getOs()==1){
        //alert(2)
    }else{
        //alert(3)
    }
$(function(){
var a = $("body").height();
    var id = "{:input('id')}";
    $.ajax({
        type: "get",
        dataType: "html",
        url: "{:url('interfaces/config/height')}",
        data: {'height':a,'id':id},
        success: function (data) {
            console.log(data.height);
        }
    });
})

    </script>
</head>
<body>
    <div class="jia">
        {$height}
        {$data}
    </div>
</body>
</html>